/*
 * @(#)WheatBeerApplication.java $version 2013. 5. 24.
 *
 * Copyright 2007 NHN Corp. All rights Reserved. 
 * NHN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

package com.design.oop;

import android.app.Application;
import android.content.Context;

/**
 * @author kelly
 */
public class WheatBeerApplication extends Application {
	private static Context mContext;
	private static int mColumnWidth = 0;

	@Override
	public void onCreate() {
		super.onCreate();

		mContext = this;
	}

	public static Context getContext() {
		return mContext;
	}

	public static int getStatusBarHeight() {
		int result = 0;
		int resourceId = mContext.getResources().getIdentifier("status_bar_height", "dimen", "android");
		if (resourceId > 0) {
			result = mContext.getResources().getDimensionPixelSize(resourceId);
		}
		return result;
	}

	public static void setColumnWidth(final int columnWidth) {
		if (columnWidth == 0) {
			mColumnWidth = columnWidth;
		}
	}

	public static int getColumnWidth() {
		return mColumnWidth;
	}
}
